package com.college_career_system.utils;


import com.college_career_system.pojo.dto.*;
import com.college_career_system.pojo.po.*;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * @author feizhu
 */
@Mapper
public interface DtoPoMapper {

    DtoPoMapper INSTANCE = Mappers.getMapper(DtoPoMapper.class);

    @Mapping(target = "enterpriseId", ignore = true)
    @Mapping(target = "pwd", ignore = true)
    Enterprise toEnterprise(EnterpriseDTO enterpriseDTO);


    @Mapping(target = "createTime", ignore = true)
    Recruit toRecruit(RecruitDTO recruitDTO);

    @Mapping(target = "uid", ignore = true)
    User toUser(UserDTO userDTO);
}
